5/9/2021

Overview

  • What is Distill R Markdown?
  • How to write scientific manuscripts using Distill R Markdown?
  • How to publish finished articles using GitHub?

R Markdown

  • A framework for creating fully reproducible dynamic documents in R in multiple formats such as
    • Word
    • PDF
    • HTML

Installation

  • Install from CRAN with:
install.packages("rmarkdown")

Distill R Markdown

  • An R Markdown template designed for scientific papers
  • Best suited for technical and scientific presentations
  • Functionalities to insert:
    • author information
    • text
    • tables
    • figures
    • references
    • mathematical symbols or equations (using LaTeX)
    • … and more!

Let’s take a look at my manuscript! :)

Get Started with Distill

Installation:

  • Install the released version of distill from CRAN:
install.packages("distill")
  • Or install the development version from GitHub with:
install.packages("devtools")
devtools::install_github("rstudio/distill")

Loading package:

library(distill)

Creating a Distill article

Via RStudio IDE: File > New File > R Markdown

Using command line:

create_article("article.Rmd")

Distill .Rmd file components

Images and Tables

Mathematical Equations/Symbols

Inserting References

  • Get bibtex file
    • a text file with bib extension containing bibtex citations
    • can be generated manually or automatically created using Zotero, PubMed

Inserting References

Inserting References

  • Specify path to the bibtex file in YAML
bibliography: refs/bibtex.bib
  • Use @citekey to insert in-text citation

Demo Time ~

Publishing Finished Article

  • Put everything into a public GitHub repository
    • Rename the article.html -> index.html

Publishing Finished Article

  • Set up GitHub Page
    • Setting > Page

Resources